package com.gogowan.agroenterprise.widget.adapter;

import android.content.Context;
import android.widget.TextView;

import com.gogowan.agroenterprise.R;
import com.gogowan.agroenterprise.base.AbsListAdapter;
import com.gogowan.agroenterprise.base.ViewHolder;
import com.gogowan.agroenterprise.model.CodeInfoResult;

import java.util.List;

/**
 * @Description: PackAdapter
 * @author mdp
 * @date 2017年1月3日 下午14:10:35 
 */
public class PackAdapter extends AbsListAdapter<CodeInfoResult> {


    /**
	 * @param context
	 * @param sourceDatas
	 * @param layoutId
	 */
	public PackAdapter(Context context, List<CodeInfoResult> sourceDatas,
			int layoutId) {
		super(context, sourceDatas, layoutId);
	}

	@Override
    public void convert(int position, ViewHolder holder, CodeInfoResult bean) {
        ((TextView)holder.getView(R.id.pack_item_cpm_tv)).setText(bean.getCode());
        ((TextView)holder.getView(R.id.pack_item_cpmc_tv)).setText("" + bean.getMaterialFullName());
        ((TextView)holder.getView(R.id.pack_item_cpxh_tv)).setText("" + bean.getSpecName());
        ((TextView)holder.getView(R.id.pack_item_scrq_tv)).setText("" + bean.getCreateDate());
    }
}
